package homework.mid_autumn_festival.string_exercise;

public class StringAndStringBuilder {
    public static void main(String[] args) {
        String str = "a";
        StringBuilder s1 = new StringBuilder(str);
        long start = System.currentTimeMillis();
        for (int i=0;i<1000000;i++){
            s1.append("a");
        }
        long end = System.currentTimeMillis();
        System.out.println("添加完毕,用时为:"+(end-start)+"ms");
    }
}
